﻿using System;
using System.Collections.Generic;
using System.Data;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ProjectSunny.Admin.Controls
{
    public partial class ViewEditProfileLogin : System.Web.UI.UserControl
    {
        public string user;
        public string email;
        public string fullname;
        public string phone;
        public string address;
        public string avatar;
        public string role;
        public int id;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["idaccount"] != null)
            {
                id = Convert.ToInt32(Request.QueryString["idaccount"]);
                DataTable dt = DAL.DCollector.DBCollector.Instance.StoredSelectTableWhereID("tbl_Account","Account_ID", id.ToString());
                user = dt.Rows[0]["Account_User"].ToString();
                email = dt.Rows[0]["Account_Email"].ToString();
                fullname = dt.Rows[0]["Account_FullName"].ToString();
                phone = dt.Rows[0]["Account_Phonenumber"].ToString();
                address = dt.Rows[0]["Account_Address"].ToString();
                avatar = dt.Rows[0]["Account_Avatar"].ToString();
                role = dt.Rows[0]["Account_Role"].ToString();
            }
        }
    }
}